package org.p2psimulator.entity.reputation.chordbased;

import org.p2psimulator.engine.Environment;
import org.p2psimulator.entity.Id;
import org.p2psimulator.entity.Network;
import org.p2psimulator.entity.OverlayNetwork;
import org.p2psimulator.entity.reputation.ReputationManager;
import org.p2psimulator.entity.reputation.ReputationRepository;
import org.p2psimulator.entity.reputation.ReputationRepositoryTypes;
import org.p2psimulator.exceptions.ReputationManagerException;

public class ChordReputationManager extends ReputationManager {

    public void loadRepositories(Environment env)
            throws ReputationManagerException {
        repositoryMap.put(ReputationRepositoryTypes.REP_SERVENT_REPOSITORY,
                new ReputationRepository(this, env));
        this.env = env;

        for (Id id : env.getPeerBank().getPeerMap().keySet()) {
            repositoryMap.get(ReputationRepositoryTypes.REP_SERVENT_REPOSITORY).addServent(id);
        }

    }
}
